package cn.wolfcode.luowowo.article.domain;

import cn.wolfcode.luowowo.common.domain.BaseDomain;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Setter
@Getter
public class Flight extends BaseDomain {

    private String airlineName;

    private String flightNum;

    private FlightCity fromCity;

    private FlightCity toCity;

    private String takeoffPortName;

    private String landingPortName;

    private Date takeoffTime;

    private Date landingTime;

    private Integer planeType;

    private String planeTypeDesc;

    private Integer adultAirportPrice;

    private Integer childAirportPrice;

    private Double punctualityRate;

    private List<Cabininfo> cabininfos = new ArrayList<>();

    public String getPlaneType(){
        switch (this.planeType){

            case 1:return "(小)";

            case 2:return "(中)";

            default:return "(大)";
        }
    }

}